/**
 * @project heima-leadnews
 * @author MECHREVO
 * @date 2024/1/23 13:54:58
 * @version 1.0
 */
package com.heima.article.listen;

import com.heima.article.service.ApArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

public class ArticleListener {
    @Autowired
    private ApArticleService apArticleService;

    @KafkaListener(topics = "down_or_up_article")
    public void kafkalistener(@RequestBody Map<String,Object> map){
        apArticleService.downOrUpArticle(map);
    }
}
